//package com.runa.monitor.platinterface.platInterface;
//
//import com.runa.monitor.platinterface.platService.gateway.pojo.HouseStormData;
//import com.runa.monitor.platinterface.platService.gateway.pojo.PanelData;
//import com.runa.monitor.platinterface.platService.gateway.pojo.StormBalanceDTO;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.util.HashMap;
//import java.util.Map;
//
//
///**
// * @author sr
// * @date 2021/11/1 14:09
// * @desc 计量AI控制器相关实现(只有ai具备的功能,不用走转发)
// */
//@RestController
//@RequestMapping("feign/buildGateway")
//public class MeterGatewayFeignController {
//    private static final Logger logger = LoggerFactory.getLogger(MeterGatewayFeignController.class);
//
//    @Resource
//    private MeterGatewayFeignServiceImpl interfaceService;
//
//    @PostMapping(value = "downloadFileGateway")
//    public Map<String, Object> downloadFileGateway(@RequestParam String msg, @RequestParam(required = false) boolean retry) {
//        logger.debug("计量请求—档案更新  数据: {} ,重发: {} ",msg,retry);
//        return interfaceService.meterDownloadFile(msg, retry);
//    }
//
//
//    @PostMapping(value = "issuedPanelParam/{gateway}")
//    public Map<String, Object> issuedPanelParam(@PathVariable String gateway, @RequestBody PanelData panelData) {
//        logger.debug("计量请求— 小瑞面板数据下发 网关: {}, 面板编号: {}", gateway, panelData.getSn());
//        return interfaceService.issuedPanelParam(gateway, panelData);
//    }
//
//    @PostMapping(value = "issuedHouseModelParam/{gateway}")
//    public Map<String, Object> issuedHouseModelParam(@PathVariable String gateway, @RequestBody HouseStormData stormData) {
//        logger.debug("平衡请求— 户模型参数下发 网关: {}, 机组参数: {}", gateway, stormData);
//        Map<String, Object> result = new HashMap<>(1);
//        if (stormData == null) {
//            result.put("status", "下发参数不可为空");
//            return result;
//        }
//        return interfaceService.issuedHouseModelParam(gateway, stormData);
//    }
//
//    @PostMapping(value = "issuedHouseBalanceModelParam/{gateway}")
//    Map<String, Object> issuedHouseBalanceModelParam(@PathVariable String gateway, @RequestBody StormBalanceDTO dto) {
//        logger.debug("平衡请求— 向楼控制器：{} 下发户全网平衡状态 ", gateway);
//        Map<String, Object> result = new HashMap<>(1);
//        if (dto == null) {
//            result.put("status", "下发参数不可为空");
//            logger.info("下发参数不可为空");
//            return result;
//        }
//        return interfaceService.issuedHouseBalanceModelParam(gateway, dto);
//    }
//}
